package cn.layku.service.member.service.impl;

import cn.layku.service.member.mapper.MemberMapper;
import cn.layku.service.member.service.MemberService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.Map;

@Service("memberService")
public class MemberServiceImpl implements MemberService {

    @Resource(name = "memberMapper")
    private MemberMapper memberMapper;


    /**
     * 添加
     */
    @Override
    public int add(Map<String, Object> map) {
        return memberMapper.insert(map);
    }

    /**
     * 更新
     */
    @Override
    public int update(Map<String, Object> map) {
        return memberMapper.update(map);
    }

    /**
     * 获取会员信息
     */
    @Override
    public Map<String, Object> get(Integer memberId) {
        return memberMapper.get(memberId);
    }
}
